﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class JudgeIsFirst : MonoBehaviour
{
    private int isFirst;
    public GameObject Notice;
    // Start is called before the first frame update
    private void Awake()
    {
        AdManager1.instance.InitData();
    }
    void Start()
    {
        AdManager1.instance.InitData();
        if (PlayerPrefs.HasKey("isFirst"))
        {
            isFirst = PlayerPrefs.GetInt("isFirst");
        }
        else
        {
            PlayerPrefs.SetInt("isFirst", 1);
            isFirst = PlayerPrefs.GetInt("isFirst");
        }
        if (isFirst != 0)
        {
            Notice.SetActive(true);
        }
        else
        {
            JumpScene();
        }
    }
    public void setIsFirst()
    {
        PlayerPrefs.SetInt("isFirst", 0);
    }
    public void JumpScene()
    {
        SceneManager.LoadScene(1);

    }
    public void Quit()
    {
        AdManager.Quit();
    }
}
